package com.cos.lession56.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: COS
 * @time: 2022/3/10 16:15
 * @description:
 */
@RestController
@RequestMapping("/demo2")
public class Demo2Controller {
    /**
     *
     * @author: COS
     * @return:
     * @time: 2022/3/10 16:18
     * @description:
     * method = RequestMethod.POST 指定这个方法只接受post请求,其他请求不接受
     */
    @RequestMapping(value = "/a",method = RequestMethod.GET)
    public String a(){
        System.out.println("aaaaaaaaaaaaaaaa");
        return "a";
    }




    @RequestMapping("/b")
    public String b(){
        System.out.println("Bbbb");
        return "b";
    }

    @RequestMapping("/helloA")
    public String helloA(){
        System.out.println("helloA");
        return "helloA";
    }

    @RequestMapping("/helloB")
    public String helloB(){
        System.out.println("helloB");
        return "helloB";
    }
    @RequestMapping("/login")
    public String login(){
        System.out.println("请让他进来登录");
        return "您已注销本站账户";
    }

}
